package com.cms.room

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update

/**
 * @author: Mr.You
 * @create: 2022-10-10 09:23
 * @description:
 **/
@Dao
interface StudentDao {
    @Insert
    fun insertStudent(vararg student: Student)
    @Delete
    fun deleteStudent(student: Student)
    @Update
    fun updateStudent(student: Student)
    @Query("select * from STUDENT_TABLE")
    fun getStudents():LiveData<List<Student>>
}